package com.zhangzhan.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhangzhan.domain.commcon.ResponseResult;
import com.zhangzhan.domain.dto.AddArticleDto;
import com.zhangzhan.domain.dto.LikeArticleDto;
import com.zhangzhan.domain.dto.UpdateArticleDto;
import com.zhangzhan.domain.entity.Article;
import com.zhangzhan.domain.vo.PageVO;

/**
 * @author 张一恒
 * @version 1.0
 * 文章表
 */
public interface ArticleService extends IService<Article> {
    //热门文章查询
    ResponseResult hotArticle();

    //文章分页查询
    ResponseResult articleList(Integer pageNum, Integer pageSize, Long categoryId);

    //文章详情查询
    ResponseResult selectById(Long id);

    //更新文章浏览量
    ResponseResult updateViewCount(Long id);

    //新增博文
    ResponseResult addArticle(AddArticleDto addArticleDto);

    //分页查询博文
    ResponseResult<PageVO> listArticle(Integer pageNum, Integer pageSize, LikeArticleDto likeArticleDto);

    //修改回显数据
    ResponseResult select(Long id);

    //修改博文
    ResponseResult updateArticle(UpdateArticleDto updateArticleDto);

    //删除博文
    ResponseResult deleteArticle(Long id);

}
